package com.example.demo.springboot.component;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class JavamailComponent {


    private Map<String,String> mailPrototeries = new HashMap<>();

    @Value("${mail.from}")
    private String from;

    @Value("${mail.to}")
    private String to;

    public Map mailPrototeries(){
        mailPrototeries.put("from",from);
        mailPrototeries.put("to",to);
        return mailPrototeries;
    }

}
